<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<!--[if lt IE 7]>
<html class="ie lt7 lt8 lt9" lang="en"><![endif]-->
<!--[if IE 7]>
<html class="ie ie7 lt7 lt8 lt9" lang="en"><![endif]-->
<!--[if IE 8]>
<html class="ie ie8 lt9" lang="en"><![endif]-->
<!--[if IE 9]>
<html class="ie ie9" lang="en"><![endif]-->
<!--[if (gt IE 9) | !(IE)]><!-->
<html lang="en">
<!--<![endif]-->
<head>
    <%@include file="../include/link.jsp" %>
    <%@include file="../include/head.jsp" %>
    <link rel="stylesheet" type="text/css" href="../../../static/wxApp/css/index.css">
</head>
<script>
    //处理图片的宽高
    function setImgWH(obj) {
        if (obj.width > obj.height) {
            $(obj).css('height', '100%');
        } else {
            $(obj).css('width', '100%');
        }
    }
</script>
<body>
<%@include file="../include/appHerder.jsp" %>
<div class="container">
    <div class="content">
        <div class="filter">
            <div class="box1">
                <span><a href="${ctx}">首页</a></span>
                <span>></span>
                <span><a href="${ctx}/home">小程序商店</a></span>
            </div>
            <%@include file="../include/categoryMenu.jsp" %>
        </div>
        <div class="companyBigBox clearfix" id="content">

        </div>
        <script type="text/html" id="content_template">
            {{each list}}
            <a href="/app/{{$value.id}}.html" target="_blank">
                <div class="companyBox">
                    <div class="top clearfix">
                        <div class="left">
                            {{if $value.sourceId==1 }}
                            <img onload="setImgWH(this)" src="//img.cmcmcdn.com/{{$value.logoUrl}}" alt="{{$value.appName}}小程序">
                            {{else if $value.sourceId==2}}
                            <img onload="setImgWH(this)" src="https://media.ifanrusercontent.com/{{$value.logoUrl}}" alt="{{$value.appName}}小程序">
                            {{else if $value.sourceId==3}}
                            <img onload="setImgWH(this)" src="https://img.kukuwu.com/{{$value.logoUrl}}" alt="{{$value.appName}}小程序">
                            {{/if}}
                        </div>
                        <div class="right">
                            <div class="box1 clearfix">
                                <span class="span1">{{$value.appName}}</span>
                                <span class="span2">体验</span>
                            </div>
                            <div class="box2 clearfix">
                                <span class="span1"><img src="../../../static/wxApp/img/xing.png" alt="{{$value.appName}}小程序"></span>
                                <span class="span2">{{$value.hot}}</span>
                            </div>
                            <div class="box3">
                                <p title="{{$value.appSum}}">{{$value.appSum}}</p>
                            </div>
                        </div>
                    </div>
                    <div class="bottom clearfix">
                        <div class="left">
                            {{include 'tagsTemplate' $value}} <!--引入子模板-->
                        </div>
                        <div class="right">
                            9999+
                        </div>
                    </div>
                </div>
              </a>
            {{/each}}
        </script>
        <script id="tagsTemplate" type="text/html">
            {{each tags}}
                 <span>{{$value}}</span>
            {{/each}}
        </script>
        <div class="js-load-more" style="display: block;">加载更多</div>
    </div>
</div>
<%@include file="../include/footer.jsp" %>
</body>
<script>
    $(function () {
        // 点击标签的效果
        $("#tags a").click(function () {
            $("#tags a").removeClass("on")
            $(this).addClass("on")
        })
    });
</script>
<script type="text/javascript" src="../../../static/common/js/template.js"></script>
<script type="text/javascript" src="../../../static/wxApp/js/index.js"></script>
</html>
